#include <iostream>
#include <vector>


class A
{
public:
    //以任意长度的元素参数去初始化一个对象
    A(std::initializer_list<int> list){}
};

std::vector<int> func()
{
    return {};
}

void Log(std::initializer_list<std::string> list)
{
    for(auto ite = list.begin(); ite != list.end(); ite++)
    {
        std::cout << *ite << " ";
    }
    std::cout << std::endl;
}

int main()
{
    //列表初始化
    A a{1,2,3,4,5,6};
    std::vector<int> v = {1};

    Log({"1.cpp","line 30", "空指针错误"});
    return 0;
}